from selenium import webdriver
import time

driver = webdriver.Firefox()
driver.get("https://www.baidu.com/")
time.sleep(3)
driver.maximize_window()
title = driver.title
print(title)
url = driver.current_url
print(url)
# 获取文本信息
# text = driver.find_element_by_id("bottom_layer").text
# print(text)
# 先搜索徐渭熊
# driver.find_element_by_css_selector("#kw").send_keys("徐渭熊")
# driver.find_element_by_css_selector("#su").submit()
# time.sleep(6)
# # # 清除 徐渭熊
# driver.find_element_by_id("kw").clear()
# time.sleep(5)
# driver.find_element_by_id("kw").send_keys("徐骁")
# # # 提交搜索信息，这里和click作用一样
# driver.find_element_by_id("su").submit()
time.sleep(6)

driver.quit()